﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
using Medianamik.Core;

namespace Medianamik.UI.ConfigManagement
{
    public partial class CacheManagement : BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //if (!Page.IsPostBack)
            //{
            //    BindList();
            //}
        }

        protected void RefreshUrlDictionary(object sender, EventArgs e)
        {
            ConfigManager.RefreshUrlDictionary();
        }

        //private void BindList()
        //{
        //    var datasource = from item in HttpRuntime.Cache.Cast<DictionaryEntry>()
        //                     select new { Key = item.Key.ToString(), Value = item.Value.GetType().FullName,
        //                     Size = GetSize(item.Value)}; 
        //    GridCacheItems.DataSource = datasource;
        //    GridCacheItems.DataBind();
        //}

        //private int? GetSize(object p)
        //{
           

        //    return default(int?);
        //}
    }
}
